package com.example.hospitalmanagement.activity

import android.Manifest
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.amap.api.location.AMapLocationClient
import com.example.hospitalmanagement.R
import com.tbruyelle.rxpermissions3.RxPermissions


class NavigationActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_navigation)
        RxPermissions(this).request(
            Manifest.permission.INTERNET,
            Manifest.permission.ACCESS_FINE_LOCATION,
            Manifest.permission.ACCESS_COARSE_LOCATION,
            Manifest.permission.READ_PHONE_STATE,
            Manifest.permission.ACCESS_NETWORK_STATE,
            Manifest.permission.ACCESS_WIFI_STATE,
            Manifest.permission.CHANGE_WIFI_STATE,
            Manifest.permission.ACCESS_BACKGROUND_LOCATION,
            Manifest.permission.ACCESS_LOCATION_EXTRA_COMMANDS,
            Manifest.permission.WRITE_EXTERNAL_STORAGE,
            Manifest.permission.BLUETOOTH,
            Manifest.permission.WAKE_LOCK
        ).subscribe {
            if (it) {
                AMapLocationClient.updatePrivacyShow(this, true, true)
                AMapLocationClient.updatePrivacyAgree(this, true)
                initView(savedInstanceState)
            }
        }
    }

    private fun initView(savedInstanceState: Bundle?) {

    }
}